class Solution(object):
    def merge(self, nums1, m, nums2, n):
        """
        :type nums1: List[int]
        :type m: int
        :type nums2: List[int]
        :type n: int
        :rtype: None Do not return anything, modify nums1 in-place instead.
        """
        i = 0
        j = 0
        i_num = 0
        while i < m + n and j < n:
            if i_num == m:
                for k in range(i, m + n):
                    nums1[k] = nums2[j]
                    j += 1
            else:
                if nums2[j] <= nums1[i]:
                    for k in range(i + 1, m + n):
                        nums1[m + n - k + i] = nums1[m + n - k + i - 1]
                    nums1[i] = nums2[j]
                    i += 1
                    j += 1
                else:
                    i += 1
                    i_num += 1


data = Solution()
nums1 = [0]
nums2 = [1]
m = 0
n = 1
data.merge(nums1, m, nums2, n)